package net.yeah.mickey_zhouyou.database;

import net.yeah.mickey_zhouyou.database.domain.BaseEntity;
import net.yeah.mickey_zhouyou.database.domain.BaseRelationship;

public class DBUITest {

	static public void main(String[] args) {
		DBUI.init();
		AA aa1 = new AA();
		AA aa2 = new AA();
		BB bb1 = new BB();
		BB bb2 = new BB();
		RR rr1 = new RR(aa1, bb1);
		RR rr2 = new RR(aa1, bb2);
		RR rr3 = new RR(aa2, bb1);
		RR rr4 = new RR(aa2, bb2);
		DBUI.save(aa1);
		DBUI.save(aa2);
		DBUI.save(bb1);
		DBUI.save(bb2);
		DBUI.save(rr1);
		DBUI.save(rr2);
		DBUI.save(rr3);
		DBUI.save(rr4);
	}

	public static class AA extends BaseEntity {

		@Override
		public int compare(BaseEntity o1, BaseEntity o2) {
			// TODO Auto-generated method stub
			return 0;
		}

	}

	public static class BB extends BaseEntity {

		@Override
		public int compare(BaseEntity o1, BaseEntity o2) {
			// TODO Auto-generated method stub
			return 0;
		}

	}

	public static class RR extends BaseRelationship<AA, BB> {

		public RR(AA aa, BB bb) {
			super(aa, bb);
		}
	}
}
